﻿@model NFine.Domain.Entity.Biz.UserOrderEntity
@{
    ViewBag.Title = "订单详情";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<div style="padding: 20px;">
    <table class="form">
        <tr>
            <th class="formTitle">订单号：</th>
            <td class="formValue" style="">@Model.F_OrderCode </td>
            <th class="formTitle">下单时间：</th>
            <td class="formValue" style="">@Model.F_OrderTime </td>
        </tr>
        <tr>
            <th class="formTitle">商品总额：</th>
            <td class="formValue">
                @if (Model.F_TotalMoney.HasValue)
                {
                     @Model.F_TotalMoney.Value.ToString("f2") @:元
                }
            </td>
                <th class="formTitle">订单状态：</th>
                <td class="formValue">
                    @if (Model.F_OrderStatus == 0)
                    {
                        @Html.Raw("待处理");
                    }
                    else if (Model.F_OrderStatus == 1)
                    {
                        @Html.Raw("已支付");
                    }
                    else if (Model.F_OrderStatus == 2)
                    {
                        @Html.Raw("已发货");
                    }
                    else if (Model.F_OrderStatus == 3)
                    {
                        @Html.Raw("已完成");
                    }
                    else if (Model.F_OrderStatus == -1)
                    {
                        @Html.Raw("已取消");
                    }
                    else if (Model.F_OrderStatus == -2)
                    {
                        @Html.Raw("已作废");
                    }
                    else
                    {
                        @Html.Raw("存在异常");
                    }

                </td>
            
        </tr>
        <tr>
            <td colspan="4" style="height:10px;"><div style="height:1px; background-color:#333;"></div></td>
        </tr>
        <tr>
            <th class="formTitle">收货人：</th>
            <td class="formValue" style="">@Model.F_Consignee </td>
            <th class="formTitle">联系电话：</th>
            <td class="formValue">@Model.F_ContactNumber</td>
        </tr>
        @*<tr>
            <th class="formTitle">收货地址：</th>
            <td class="formValue" colspan="3">@Model.F_Address</td>
        </tr>*@
        <tr>
            <td colspan="4" style="padding-top:15px;">
                <table class="ui-jqgrid-htable ui-common-table table table-bordered">
                    <thead>
                        <tr class="ui-jqgrid-labels">
                            <td style="width:200px;text-align: center; " class="ui-th-column ui-th-ltr">
                                
                            </td>
                            <td>
                                商品名称
                            </td>
                            <td style="width:80px;text-align: center; " class="ui-th-column ui-th-ltr">
                                商品单价
                            </td>
                            <td style="width:80px;text-align: center; " class="ui-th-column ui-th-ltr">
                                数量
                            </td>
                            <td style="width:80px;text-align: center; " class="ui-th-column ui-th-ltr">
                                金额
                            </td>
                        </tr>
                    </thead>
                    <tbody>
                        @for (int i = 0; i < Model.OrderItems.Count; i++)
                        {
                            var item = Model.OrderItems[i];
                            @Html.Raw("<tr><td><img src='"+item.F_ThumbnailsUrl+"' style='width:100%;' alt='"+item.F_ProductName+"'/></td>"+
                                "<td>"+item.F_ProductName+ "</td><td>￥"+item.F_SellPrice+"</td><td>"+item.F_Quantity+ "</td><td>￥"+item.F_TotalPrice+"</td>"
                           + "</tr>");
                        }
                    </tbody>
                </table>
            </td>
        </tr>
        
    </table>
</div>


